package com.Bride.smarthome.dao.dto;

import com.baomidou.mybatisplus.annotation.*;
import com.Bride.common.core.annotation.Excel;
import com.Bride.common.core.web.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 智能设备对象
 *
 * @author winkin
 * @date 2025-09-07
 */
@EqualsAndHashCode(callSuper = true)
@Data
@TableName("smarthome_device") // 指定表名
public class SmartDeviceDO extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 设备ID */
    @TableId(type = IdType.AUTO) // 指定主键字段和生成策略
    private Long deviceId;

    /** 设备名称 */
    @Excel(name = "设备名称")
    private String deviceName;

    /** 设备类型 */
    @Excel(name = "设备类型")
    private String deviceType;

    /** 设备品牌 */
    @Excel(name = "设备品牌")
    private String brand;

    /** 设备型号 */
    @Excel(name = "设备型号")
    private String model;

    /** IP地址 */
    @Excel(name = "IP地址")
    private String ipAddress;

    /** 状态 */
    @Excel(name = "状态")
    private String status;

    /** 用户ID */
    @Excel(name = "用户ID")
    private Long userId;

    /** 删除标志（0代表存在 1代表删除） */
    @TableLogic // 逻辑删除注解
    private Integer delFlag;

    public void setDeviceId(Long deviceId)
    {
        this.deviceId = deviceId;
    }

    public Long getDeviceId()
    {
        return deviceId;
    }
    public void setDeviceName(String deviceName)
    {
        this.deviceName = deviceName;
    }

    public String getDeviceName()
    {
        return deviceName;
    }
    public void setDeviceType(String deviceType)
    {
        this.deviceType = deviceType;
    }

    public String getDeviceType()
    {
        return deviceType;
    }
    public void setBrand(String brand)
    {
        this.brand = brand;
    }

    public String getBrand()
    {
        return brand;
    }
    public void setModel(String model)
    {
        this.model = model;
    }

    public String getModel()
    {
        return model;
    }
    public void setIpAddress(String ipAddress)
    {
        this.ipAddress = ipAddress;
    }

    public String getIpAddress()
    {
        return ipAddress;
    }
    public void setStatus(String status)
    {
        this.status = status;
    }

    public String getStatus()
    {
        return status;
    }
    public void setUserId(Long userId)
    {
        this.userId = userId;
    }

    public Long getUserId()
    {
        return userId;
    }

    public Integer getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(Integer delFlag) {
        this.delFlag = delFlag;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("deviceId", getDeviceId())
                .append("deviceName", getDeviceName())
                .append("deviceType", getDeviceType())
                .append("brand", getBrand())
                .append("model", getModel())
                .append("ipAddress", getIpAddress())
                .append("status", getStatus())
                .append("userId", getUserId())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("remark", getRemark())
                .toString();
    }
}
